<input type="button">标签问题.
来源:百度知道 编辑:UC知道 时间:2024/05/30 13:53:43
test.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无标题页</title>
<link href="1.css" type="text/css" rel="Stylesheet" />
<sctipt type="text/javascript" language="javascript" src="1.js"></script>
</head>
<body>
<input type="button" id="button1" class="bgbutton" value="测试按钮" onmouseover="over();" onmouseout="out();" onclick="pressed();"/>
</body>
</html&g
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无标题页</title>
<link href="1.css" type="text/css" rel="Stylesheet" />
<sctipt type="text/javascript" language="javascript" src="1.js"></script>
</head>
<body>
<input type="button" id="button1" class="bgbutton" value="测试按钮" onmouseover="over();" onmouseout="out();" onclick="pressed();"/>
</body>
</html&g
哥们,您真笨啊~~~~
<sctipt type="text/javascript" language="javascript" src="1.js"></script>
这一句里的sctipt错了.测几下都没有反应.
<script 不是<sctipt
但是你最的主要错误是在这里:在<input> 加载到页面以前,js中的函数已经加载过了.这里再调用时,函数里的this单指函数本身.
所以必须用一个变量来替代你的<input>对象.请仔细看下面的和你原来的区别.
----------------------
1.htm改为如下:
<script language="JavaScript" src="1.js"></script>
<body>
<input type="button" id="button1" class="bgbutton" value="测试按钮" onmouseover="over(this);" onmouseout="out(this);" onclick="pressed(this);"/>
</body>
-------------------------
1.js改为如下:
alert(0);
function press(n){
n.style.background='url(bgbutton/bg_button_pressed.png)';
}
function over(n){
n.style.background='url(bgbutton/bg_bu
<input type="image" src="...">看看这个代码
jsp问题<input type="hidden" datafld="userId" />
要使用 <input type="text"> 里填写的数据作为参数
<input type="image">图片按钮怎么做成有提交的功能??
<input type="image" 网页表单提交的”怪“问题?高手进!!
<input type="textarea" >输入满一行怎样自动换行?
怎么用<input type="imgage">来提交form 表单
<input name="newsbook" type="checkbox" id="bestbook" value="1">关于type类型checkbox
<input type="button" value="提交" onClick="openpage()">
input type="hidden" name="TestCustomerID